package com.xiao.demo.eureka.client.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.demo.server.api.PeopleVo;

@RestController
public class IndexController {

    @Value("${server.port}")
    String port;
    
    
    @RequestMapping("/hi")
    public String home(@RequestParam String name) {
        return "hi "+name+",i am from port:" +port;
    }

    @RequestMapping(value = {"/",""})
    public PeopleVo index() {
    	PeopleVo people = new PeopleVo();
    	people.setId(1);
    	people.setName("肖作新");
    	people.setSex(true);
    	people.setWeight(160D);
    	people.setHeight(170D);
    	people.setAddress("上海市浦东新区");
    	
    	return people;
    }
    
    
}
